package org.xdq.原型模式;

public class MyObject extends Prototype {

    private int id;

    public MyObject(int id) {
        this.id = id;
        System.out.println("构造方法！！！！！");
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "MyObject{"+ id +"}";
    }
}
